﻿@model Mvc4WebApiKoTb.Models.HomeModels.CustomValidationModel

@{
    ViewBag.Title = "CustomValidation";
}

<div class="row">
    <div class="span12">
        <h2>CustomValidation - CustomValidationModel</h2>
        <hr />
        <div class="well">Kurzer Beschreibungstext für das aktuelle Formular</div>

    </div>
</div>
<div class="row">
    <div class="span12">
        @Html.ShowCustomMessage()
        
    </div>
</div>

<div class="row">
    <div class="span12">
        @using (Html.BeginForm("CustomValidation", "Home", FormMethod.Post, new { @class = "form-horizontal" }))
        {
            <div class="control-group">
                @Html.LabelFor(model => model.Name, new { @class = "control-label" })

                <div class="controls">
                    @Html.EditorFor(model => model.Name)
                    @Html.ValidationMessageFor(model => model.Name)
                </div>
            </div>
            <div class="control-group">
                @Html.LabelFor(model => model.Birthdate, new { @class = "control-label" })

                <div class="controls">
                    @Html.EditorFor(model => model.Birthdate)
                </div>
            </div>
            <div class="control-group">
                @Html.LabelFor(model => model.Deathdate, new { @class = "control-label" })

                <div class="controls">
                    @Html.EditorFor(model => model.Deathdate)
                </div>
            </div>
            <div class="control-group">
                @Html.LabelFor(model => model.MinValue, new { @class = "control-label" })

                <div class="controls">
                    @Html.EditorFor(model => model.MinValue)
                    @Html.ValidationMessageFor(model => model.MinValue)
                </div>
            </div>
            <div class="control-group">
                @Html.LabelFor(model => model.MaxValue, new { @class = "control-label" })

                <div class="controls">
                    @Html.EditorFor(model => model.MaxValue)
                </div>
            </div>
            <div class="form-actions">
                <input class="btn btn-primary" type="submit" value="Create" />
            </div>
        }
    </div>
</div>

<div class="row">
    <div class="span12">
        <div class="well">
            @Html.ActionLink("Zurück zur Auflistung", "Index", null, new { @class = "btn btn-mini" })
        </div>
    </div>
</div>

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}
